Question: 1 -
Which of the following can be operands of arithmetic operators?
-
Characters
-
Numeric
-
Boolean
-
Both Numeric & Characters
Answer:
Both Numeric & Characters
Solution:
The operand of arithmetic operators can be any of numeric or character type, But not boolean.
The operand of arithmetic operators can be any of numeric or character type, But not boolean.
Question: 2 -
Modulus operator, %, can be applied to which of these?
-
Integers
-
Floating - point numbers
-
Both Integers and floating - point numbers
-
None of the mentioned
Answer:
Both Integers and floating - point numbers
Solution:
Modulus operator can be applied to both integers and floating point numbers.
Modulus operator can be applied to both integers and floating point numbers.
Question: 3 -
Decrement operator, −−, decreases the value of variable by what number?
-
4
-
2
-
1
-
3
Answer:
1
Solution not available.
Question: 4 -
Which of these statements are incorrect?
-
Assignment operators are more efficiently implemented by Java run-time system than their equivalent long forms
-
None of the mentioned
-
Assignment operators run faster than their equivalent long forms
-
Assignment operators can be used only with numeric and character data type
Answer:
None of the mentioned
Solution not available.
Question: 5 -
Can 8 byte long data type be automatically type cast to 4 byte float data type?
-
TRUE
-
FALSE
-
Can be true or false
-
can not say
Answer:
TRUE
Solution:
Both data types have different memory representation that is why 8-byte integral data type can be stored to 4-byte floating point data type.
Both data types have different memory representation that is why 8-byte integral data type can be stored to 4-byte floating point data type.